﻿using LuDragon.Data.Entities;
using LuDragon.Data.Migrations;
using System.Data.Entity;

namespace LuDragon.Data.DataHandler
{
    /// <summary>
    /// EF数据上下文 
    /// </summary>
    public class EFContext : DbContext
    {
        public EFContext() : base("name=DbContext")
        {
            Database.SetInitializer(new MigrateDatabaseToLatestVersion<EFContext, Configuration>("DbContext"));
        }

        #region 系统实体
        public DbSet<Sys_User> Sys_User { get; set; }
        public DbSet<Sys_Role> Sys_Role { get; set; }
        public DbSet<Sys_Navigation> Sys_Navigation { get; set; }
        public DbSet<Sys_Logs> Sys_Logs { get; set; }
        #endregion

    }
}
